import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

/**
 * 按钮
 */
class ButtonWidget extends StatelessWidget {
  ButtonWidget({
    Key ? key,
    @required this.text,
  }) : super(key: key);
  final String ? text;

  @override
  Widget build(BuildContext context) {
    return new Scaffold(
      appBar: AppBar(
        title: Text(text??""),
      ),
      body: new Column(
        //居中
        mainAxisAlignment: MainAxisAlignment.start,
        // crossAxisAlignment: CrossAxisAlignment.stretch,
        children: <Widget>[
          //
          new Align(
            alignment: Alignment.center,

            heightFactor: 1.0,
            child: TextButton(
              // padding: EdgeInsets.all(10),
              child: Text("RaisedButton"),
              onPressed: () {},
            ),
          ),
          new Align(
            alignment: Alignment.center,
            heightFactor: 1.0,
            child: TextButton(
              // padding: EdgeInsets.all(10),
              child: Text("FlatButton"),
              onPressed: () {},
            ),
          ),
          new Align(
            alignment: Alignment.center,
            heightFactor: 1.0,
            child: TextButton(
              // padding: EdgeInsets.all(10),
              child: Text("OutlineButton"),
              onPressed: () {},
            ),
          ),
          new Align(
            alignment: Alignment.center,
            heightFactor: 1.0,
            child: IconButton(
              padding: EdgeInsets.all(10),
              icon: Icon(Icons.thumb_up),
              onPressed: () {},
            ),
          ),
          new Align(
            alignment: Alignment.center,
            heightFactor: 1.0,
            child: TextButton.icon(
              icon: Icon(Icons.send),
              label: Text("RaisedButton.icon "),
              onPressed: () {},
            ),
          ),
          // new Align(
          //   alignment: Alignment.center,
          //   heightFactor: 1.0,
          //   child: TextButton(
          //     elevation: 5.0,
          //     //正常状态下的阴影
          //     highlightElevation: 8.0,
          //     ////按下时的阴影
          //     color: Colors.blue,
          //     //按钮背景颜色
          //     highlightColor: Colors.blue[700],
          //     //按钮按下时的背景颜色
          //     colorBrightness: Brightness.dark,
          //     splashColor: Colors.grey,
          //     //点击时，水波动画中水波的颜色
          //     child: Text("自定义按钮"),
          //     shape: RoundedRectangleBorder(
          //         //圆角等
          //         borderRadius: BorderRadius.circular(20.0)),
          //     onPressed: () {}, //按钮点击回调
          //   ),
          // ),
          Align(
            alignment: Alignment.center,
            // heightFactor: 1.0,
            child: TextButton(
              child: Text('RaisedButton_circular'),
              onPressed: () {},
              // shape: BeveledRectangleBorder(
              //     side: BorderSide(width: 0.5, color: Colors.red),
              //     borderRadius: BorderRadius.circular(10)),
              // elevation: 1.0,
            ),
          ),
          Align(
            alignment: Alignment.center,
            // heightFactor: 1.0,
            child: TextButton(
              child: Text('RaisedButton_zero'),
              onPressed: () {},
              // shape: BeveledRectangleBorder(
              //     side: BorderSide(width: 0.5, color: Colors.red),
              //     borderRadius: BorderRadius.zero),
              // elevation: 1.0,
            ),
          ),
          Align(
            alignment: Alignment.center,
            // heightFactor: 1.0,
            child: TextButton(
              child: Text('RaisedButton_vertical'),
              onPressed: () {},
              // shape: BeveledRectangleBorder(
              //     side: BorderSide(width: 0.5, color: Colors.red),
              //     borderRadius: BorderRadius.vertical()),
              // elevation: 1.0,
            ),
          ),
          Align(
              alignment: Alignment.center,
              // heightFactor: 1.0,
              child: TextButton(
                // highlightColor: Colors.deepOrange,
                // color: Colors.deepOrange,
                // textColor: Colors.white,
                child: Container(

                  height: 60,
                  width: 200,
                  child: Text('球场的'),
                  alignment: Alignment.center,
                ),
                // shape: StadiumBorder(
                //
                //   side: BorderSide(
                //     width: 1,
                //     color: Colors.red,
                //     style: BorderStyle.none,
                //     // style: BorderStyle.none,
                //   ),
                // ),
                onPressed: () {  },
              )),
          Align(
            alignment: Alignment.center,
            heightFactor: 1.0,
            child: TextButton(
              // color: Colors.blue,
              // textColor: Colors.white,
              child: Container(
                height: 50,
                width: 50,
                child: Text('圆的'),
                alignment: Alignment.center,
              ),
              // shape: CircleBorder(
              //   side: BorderSide(
              //     width: 2,
              //     color: Colors.red,
              //     style: BorderStyle.solid,
              //     // style: BorderStyle.none,
              //   ),
              // ),
              onPressed: () {  },
            ),
          ),
          new Align(
            alignment: Alignment.center,
            heightFactor: 1.0,
            child: TextButton(
              // elevation: 5.0,
              // // //正常状态下的阴影
              // // highlightElevation: 8.0,
              // // ////按下时的阴影
              // color: Colors.blue,
              // textColor: Colors.white,
              // //按钮背景颜色
              // // highlightColor: Colors.blue[700],
              // //按钮按下时的背景颜色
              // // colorBrightness: Brightness.dark,
              // splashColor: Colors.grey,
              //点击时，水波动画中水波的颜色
              child: Text("椭圆形"),
              // shape: RoundedRectangleBorder(
              //   //圆角等
              //     borderRadius: BorderRadius.circular(20.0)),
              onPressed: () {}, //按钮点击回调
            ),
          ),
        ],
      ),
    );
  }
}
